<script type="text/javascript">
    layui.use(['index', 'treeSelect'], function () {
        var treeSelect = layui.treeSelect;
        treeSelect.render({
            elem: '#parent_id',
            data: "{{route('admin.base.industry.tree')}}",
            placeholder: '请选择',
            success: function (data) {
                let parent_id = '{{$industry->parent_id}}';
                if (parent_id != null && parent_id != '') {
                    treeSelect.checkNode('parent_id', parent_id);
                }
            }
        });
    });

</script>
